package test.com.sms.selenium.singlepoint.util;

import org.openqa.selenium.By;

import test.com.sms.selenium.framework.SeleniumPageUtil;
import test.com.sms.selenium.util.SeleniumUtil;

public class SpITADDefaultPageUtil extends SeleniumPageUtil {
	
//	public final static By IIM_LINK_UPDATE = By.id("ctl44_lnkUpdate");
//	public final static By IIM_LINK_EXPORT_TO_EXCEL = By.id("ctl44_btnExport");
//	public final static By IIM_LINK_EXPORT_EXCEL_COMPLETE = By.id("ctl44_btnExportComplete");
//	public final static By IIM_LINK_PRINT_ITAD_LABELS = By.id("ctl44_btnPrint");
//	public final static By IIM_SPAN_ENTER_SRO = By.id("ctl44_lblGetSRO");
//	public final static By IIM_INPUT_SRO = By.id("ctl44_txtSro");
//	public final static By IIM_SPAN_GET_ITEM_FOR_STATUS = By.id("ctl44_lblGetStatus");
//	public final static By IIM_SELECT_GET_ITEM_FOR_STATUS = By.id("ctl44_ddlStatusCodes");
//	public final static By IIM_SPAN_SORT_BY = By.id("ctl44_lblsort");
//	public final static By IIM_SELECT_SORT_BY = By.id("ctl44_ddlSortBy");
//	public final static By IIM_SPAN_DIRECTION = By.id("ctl44_lblDirection");
//	public final static By IIM_SELECT_DIRECTION = By.id("ctl44_ddlDirection");

	public final static By IIM_LINK_ENTER_ITEM = By.xpath("//a[text()='Enter Item']");
	public final static By IIM_LINK_SHOW_DOCUMENTS_PANEL = By.xpath("//a[text()='Show Documents Panel']");
	public final static By IIM_DIV_SRO_NUMBERS = By.id("divSroNumbers");
	public final static By IIM_DIV_TITILE_SRO_NUMBERS = By.id("spnTitleSimpleSubmit");
	
	/** elements display after click sro number under ITAD*/
	public final static By ITSRO_DIV_TITLE = By.className("divTitle3");
	public final static By ITSRO_DIV_ITEMS = By.id("divItems");
	
	public static void enterITADInventoryManagementDefaultPage(){
		SpHomePageUtil.enter();
		SpHomePageUtil.enterITADInventoryManagementPage();
	}
	
	public static void waitForPageToLoad() {
		SeleniumUtil.selectDefaultContent();
		SeleniumUtil.selectFrame(SpHomePageUtil.HOME_FRAME_CONTENT_NAME);
		SeleniumUtil.waitOnElements(new By[]{
				IIM_LINK_ENTER_ITEM, IIM_LINK_SHOW_DOCUMENTS_PANEL, IIM_DIV_SRO_NUMBERS
			});
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(IIM_LINK_ENTER_ITEM));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(IIM_LINK_SHOW_DOCUMENTS_PANEL));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(IIM_DIV_SRO_NUMBERS));
	}
}
